﻿<phone:PhoneApplicationPage
    x:Class="Sinergija13.WP7App.Views.EventInfoView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:b="clr-namespace:Sinergija13.WP7App.Infrastructure.Behaviours"
    xmlns:prismInteractivity="clr-namespace:Microsoft.Practices.Prism.Interactivity;assembly=Microsoft.Practices.Prism.Interactivity"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    xmlns:prismInteractionRequest="clr-namespace:Microsoft.Practices.Prism.Interactivity.InteractionRequest;assembly=Microsoft.Practices.Prism.Interactivity"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False"
    
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    
    Style="{StaticResource TransitionPageStyle}"
    
    DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=EventInfoViewModel}"
    
    toolkit:TiltEffect.IsTiltEnabled="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="Sinergija 13" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="event info" Margin="9,17,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,20,12,0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Margin="12,0,0,20">
                    <TextBlock Text="Naziv događaja:" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    <TextBlock Text="{Binding Name}" TextWrapping="Wrap"  Style="{StaticResource PhoneTextTitle2Style}"/>
                </StackPanel>
                <StackPanel Grid.Row="1" Margin="12,0,0,20">
                    <TextBlock Text="Vreme:" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    <TextBlock Text="{Binding TimeSpanString}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"/>
                </StackPanel>
                <StackPanel Grid.Row="2" Margin="12,0,0,20">
                    <TextBlock Text="Mesto:" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    <TextBlock Text="{Binding Place}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"/>
                </StackPanel>
                <StackPanel Grid.Row="3" Margin="12,0,0,20">
                    <TextBlock Text="Adresa:" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    <TextBlock Text="{Binding Address}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"/>
                        <Button Height="55" BorderThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding HasMap, Converter={StaticResource VisibilityConverter}}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                    <Image Source="{Binding PushpinImage}" Height="20" Width="20"
                                       HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    <TextBlock Text="prikaži na mapi" VerticalAlignment="Center"  FontSize="15" Margin="10,0,0,0" Foreground="{StaticResource PhoneForegroundBrush}"/>
                                </StackPanel>
                            </Button.Content>
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Tap">
                                    <i:InvokeCommandAction Command="{Binding BingMapCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>                        
                </StackPanel>
                <StackPanel Grid.Row="4" Margin="12,0,0,20">
                    <TextBlock Text="Opis:" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    <TextBlock Text="{Binding Description}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"/>
                </StackPanel>
                <StackPanel Grid.Row="5" Margin="12,0,0,20">
                    <TextBlock Text="Napomena:" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    <TextBlock Text="{Binding Note}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"/>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>